﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EnvironmentalMonitor.Support.Module.Manage
{
    /// <summary>
    /// 用户
    /// </summary>
    public class User : EnvironmentalMonitor.Support.Module.AbstractModule
    {
        private string _Name;
        /// <summary>
        /// 名称
        /// </summary>
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this._Name = value;
            }
        }

        private string _Account;
        /// <summary>
        /// 帐户
        /// </summary>
        public string Account
        {
            get
            {
                return this._Account;
            }
            set
            {
                this._Account = value;
            }
        }

        private string _Password;
        /// <summary>
        /// 密码
        /// </summary>
        public string Password
        {
            get
            {
                return this._Password;
            }
            set
            {
                this._Password = value;
            }
        }

        private bool _Prerogative;
        /// <summary>
        /// 特权
        /// </summary>
        public bool Prerogative
        {
            get
            {
                return this._Prerogative;
            }
            set
            {
                this._Prerogative = value;
            }
        }

        private bool _Authentication;
        /// <summary>
        /// 验证
        /// </summary>
        public bool Authentication
        {
            get
            {
                return this._Authentication;
            }
            set
            {
                this._Authentication = value;
            }
        }

        /// <summary>
        /// 特权文本
        /// </summary>
        public string PrerogativeText
        {
            get
            {
                string result = string.Empty;

                if (this.Prerogative)
                {
                    result = "特权用户";
                }
                else
                {
                    result = "普通用户";
                }

                return result;
            }
        }

        private List<Page> _Pages;
        /// <summary>
        /// 页面集合
        /// </summary>
        public List<Page> Pages
        {
            get
            {
                return this._Pages;
            }
            set
            {
                this._Pages = value;
            }
        }

        private List<Menu> _Menus;
        /// <summary>
        /// 菜单集合
        /// </summary>
        public List<Menu> Menus
        {
            get
            {
                return this._Menus;
            }
            set
            {
                this._Menus = value;
            }
        }
    }
}
